﻿using System.Diagnostics.Contracts;

namespace System.Diagnostics
{
	internal static class StopwatchExtensions
	{
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "False positive.")]
		public static void Restart(this Stopwatch watch)
		{
			Contract.Requires(watch != null);

			watch.Reset();
			watch.Start();
		}
	}
}